home *** CD-ROM | disk | FTP | other *** search
- From: mikew@wyse.wyse.com (Mike Wexler)
- Newsgroups: comp.sources.x
- Subject: v01i065: torch: dialog utilities, Part04/04
- Message-ID: <1738@wyse.wyse.com>
- Date: 12 Oct 88 18:42:52 GMT
- Approved: mikew@wyse.com
-
- Submitted-by: gary@torch.UUCP (Gary Henderson)
- Posting-number: Volume 1, Issue 65
- Archive-name: torch/part04
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 4 (of 4)."
- # Contents: alert.1
- # Wrapped by mikew@wyse on Wed Oct 12 11:38:42 1988
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'alert.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'alert.1'\"
- else
- echo shar: Extracting \"'alert.1'\" \(5187 characters\)
- sed "s/^X//" >'alert.1' <<'END_OF_FILE'
- X.TH ALERT 1 "3 October 1988" "X Version 11"
- X.SH NAME
- Xalert \- display a warning message in a window
- X.SH SYNOPSIS
- X.B alert
- X[
- X.B \-z
- X]
- X[
- X.B \-standard X Toolkit options \.\.\.
- X] "\fBTITLE\fP"
- X.B text to be displayed
- X.SH DESCRIPTION
- X.I Alert
- Xis a utility to issue a warning message to the user. It displays a warning
- Xsymbol, some justified text and a button in a window. The button should be
- Xclicked with the mouse to acknowledge the alert and close the window.
- X.PP
- XIf the connection to the X server cannot be established, the title and text is
- Xprinted on \fIalert\fP's standard output and the user is requested to press
- X\fIRETURN\fP to acknowledge the message.
- X.PP
- X.I Alert
- Xcan take the following option:
- X.TP 8
- X.B -z
- XNo Zoom. The window will attempt to by pass the window manager and appear
- Ximmediately, rather than going through the window manager's placement and
- Xsizing scheme.
- X.PP
- X\fIAlert\fP additionally recognizes the following standard X Toolkit command
- Xline arguments:
- X.TP 8
- X.B \-bg \fIcolour\fP \fRor\fP \-background \fIcolour\fP
- XThis option specifies the colour to use for the background of the window and
- Xwidgets. The default is `white.'
- X.TP 8
- X.B \-bd \fIcolour\fP \fRor\fP \-bordercolor \fIcolour\fP
- XThis option specifies the colour to use for the border of the main window.
- XThe default is `black.'
- X.TP 8
- X.B \-bw \fInumber\fP \fRor\fP \-borderwidth \fInumber\fP
- XThis option specifies the width in pixels of the border surrounding the main
- Xwindow.
- X.TP 8
- X.B \-fg \fIcolour\fP \fRor\fP \-foreground \fIcolour\fP
- XThis option specifies the colour to use for all text and symbols. The default
- Xis `black'.
- X.TP 8
- X.B \-fn \fIfont\fP
- XThis option specifies the font to be used for displaying the text warning
- Xmessage. The default is `serif10'.
- X.TP 8
- X.B \-name \fIname\fP
- XThis option specifies the application name under which resources are to be
- Xobtained, rather than the default executable file name, `alert'.
- X.TP 8
- X.B \-geometry \fIgeometry\fP
- XThis option specifies the preferred size and position of the alert window; see
- X\fIX(1)\fP;
- X.TP 8
- X.B \-display \fIdisplay\fP
- XThis option specifies the X server to contact; see \fIX(1)\fP.
- X.TP 8
- X.B \-xrm \fIresourcestring\fP
- XThis option specifies a resource string to be used. This is especially
- Xuseful for setting resources that do not have separate command line options.
- X.SH "X DEFAULTS"
- X\fIAlert\fP is implemented using the Athena widgets. Each widget can
- Xindividually or in groups have various visual and operational aspects changed
- Xvia a `.Xdefaults' file on the client machine or the `RESOURCE_MANAGER'
- Xproperty on the server. All widgets have a common set of resources
- X(background, backgroundPixmap, etc.) and resources unique to each type of
- Xwidget; a `command button' widget, for example, also has a cursor resource.
- XFor a full list see the document \fIX Toolkit Widgets - C Language X
- XInterface\fP.
- X.PP
- XThe path names and types of all widgets used by \fIalert\fP are as follows:
- X.TP 8
- X.B "\fIXXX\fP.alert/yorn"
- XThe widget that is a child of root. All the other widgets used by the alert
- Xbox are children or grand children of this widget.
- X.TP 8
- X.B "\fIXXX\fP.alert/yorn.contents"
- XA form widget that manages the layout of the alert box. Normally completely
- Xcovers the alert/yorn widget.
- X.TP 8
- X.B "\fIXXX\fP.alert/yorn.contents.symbol"
- XA widget to display the alert symbol.
- X.TP 8
- X.B "\fIXXX\fP.alert/yorn.contents.ok/yes button"
- XA command button widget to obtain an acknowledgement from the user, normally
- Xdisplaying an `equals' symbol.
- X.TP 8
- X.B "\fIXXX\fP.alert/yorn.contents.message"
- XA widget to display and format the text message.
- X.PP
- XThe `\fIXXX\fP' may be replaced by either \fIalert\fP's classname, `Xopentop',
- Xor its application name, `alert'.
- X.PP
- XAdditionally, the following items are also fetched from the resource database:
- X.TP 8
- X.B "alertsym"
- XThe pathname of a bitmap file to use as an alternative to the
- X`exclamation-mark-in-a-triangle' symbol displayed in the `symbol' widget.
- X.TP 8
- X.B "oksym"
- XThe pathname of a bitmap file to use as an alternative to the `equals' symbol
- Xdisplayed in the `ok/yes button' widget.
- X.TP 8
- X.B "backgroundPixmap.foreground"
- XOne of two colours (the other is the widget's background colour) required when
- Xconverting a bitmap file into a pixmap for use as the widget's background
- Xpixmap.
- X.SH RETURN CODES
- X.IP
- X0 \- Termination via the acknowledge box.
- X.IP
- X2 \- Termination due to some internal error.
- X.SH ENVIRONMENT
- X.TP 8
- XDISPLAY - the default host name and display number of the X server.
- X.TP 8
- XXENVIRONMENT - the name of the Xdefaults file to use, normally
- X$HOME/.Xdefaults.
- X.SH EXAMPLES
- X.IP
- Xalert "Low disk space" Warning: There are less than 200 free disk blocks
- X.PP
- XWill open an alert box with the title
- X.I Low disk space
- Xand containing the text
- X.I Warning: There are less than 200 free disk blocks
- X.SH FILES
- X$HOME/.Xdefaults
- X/usr/lib/X11/app-defaults/Xopentop
- X.SH SEE ALSO
- Xgs(1), yorn(1)
- X.SH BUGS
- X.PP
- XIf the font is too large or the message too long, the text will be clipped.
- X.PP
- XThe title may not be displayed if the window manager does not provide title
- Xbars around windows or the \fB\-z\fP option is used.
- X.SH AUTHOR
- XGary Henderson & Mark E. Howells, Torch Computers Ltd.
- END_OF_FILE
- if test 5187 -ne `wc -c <'alert.1'`; then
- echo shar: \"'alert.1'\" unpacked with wrong size!
- fi
- # end of 'alert.1'
- fi
- echo shar: End of archive 4 \(of 4\).
- cp /dev/null ark4isdone
- MISSING=""
- for I in 1 2 3 4 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 4 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
- --
- Mike Wexler(wyse!mikew) Phone: (408)433-1000 x1330
- Moderator of comp.sources.x
-